Machine learning using simulated cardiograms

ABSTRACT

A system is provided for generating a classifier for classifying electromagnetic data (e.g., ECG) derived from an electromagnetic source (e.g., heart). The system accesses a computational model of the electromagnetic source. The computational model models the electromagnetic output of the electromagnetic source over time based on a source configuration (e.g., rotor location) of the electromagnetic source. The system generates, for each different source configuration (e.g., different rotor locations), a modeled electromagnetic output (e.g., ECG) of the electromagnetic source for that source configuration. For each modeled electromagnetic output, the system derives the electromagnetic data for the modeled electromagnetic output and generates a label (e.g., rotor location) for the derived electromagnetic data from the source configuration for the modeled electromagnetic data. The system trains a classifier with the derived electromagnetic data and the labels as training data. The classifier can then be used to classify the electromagnetic output collected from patients.

CROSS-REFERENCE TO RELATED APPLICATION

This application is a continuation of U.S. patent application Ser. No.16/162,695 filed Oct. 17, 2018, which claims the benefit of U.S.Provisional Application No. 62/663,049, filed on Apr. 26, 2018, entitled“MACHINE LEARNING USING SIMULATED CARDIOGRAMS,” which is herebyincorporated by reference it its entirety.

BACKGROUND

Many heart disorders can cause symptoms, morbidity (e.g., syncope orstroke), and mortality. Common heart disorders caused by arrhythmiasinclude atrial fibrillation (“AF”), ventricular fibrillation (“VF”),atrial tachycardia (“AT”), ventricular tachycardia (“VT”), atrialflutter (“AFL”), premature ventricular complexes (“PVCs”),atrioventricular nodal reentrant tachycardia (“AVNRT”), atrioventricularreentrant tachycardia (“AVRT”), and junctional tachycardia (“JT”). Thesources of arrhythmias may include stable electrical rotors, recurringelectrical focal sources, anatomically-based reentry, and so on. Thesesources are important drivers of sustained or clinically significantepisodes. Arrhythmias can be treated with ablation using differenttechnologies including radiofrequency energy ablation, cryoablation,ultrasound ablation, laser ablation, external radiation sources, and soon by targeting the source of the heart disorder. Since the sources ofheart disorders and the locations of the source vary from patient topatient, even for common heart disorders, targeted therapies require thesource of the arrhythmia to be identified.

Unfortunately, current methods for reliably identifying the sourcelocations of the source of a heart disorder can be complex, cumbersome,and expensive. For example, one method uses an electrophysiologycatheter having a multi-electrode basket catheter that is inserted intothe heart (e.g., left ventricle) intravascularly to collect from withinthe heart measurements of the electrical activity of the heart, such asduring an induced episode of VF. The measurements can then be analyzedto help identify a possible source location. Presently,electrophysiology catheters are expensive (and generally limited to asingle use) and may lead to serious complications, including cardiacperforation and tamponade. Another method uses an exterior body surfacevest with electrodes to collect measurements from the patient's bodysurface, which can be analyzed to help identify an arrhythmia sourcelocation. Such body surface vests are expensive, complex and difficultto manufacture, and may interfere with the placement of defibrillatorpads needed after inducing ventricular fibrillation to collectmeasurements during the arrhythmia. In addition, the vest analysisrequires a computed tomography (“CT”) scan and is unable to sense theinterventricular and interatrial septa where approximately 20% ofarrhythmia sources may occur.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram that illustrates the overall processing of theMLMO system in some embodiments.

FIG. 2 is a flow diagram that illustrates the overall processing ofgenerating a classifier by the MLMO system in some embodiments.

FIG. 3 is a block diagram that illustrates training and classifyingusing a convolutional neural network in some embodiments.

FIG. 4 is a flow diagram that illustrates processing of a generateclassifier component of the MLMO system in some embodiments.

FIG. 5 is a flow diagram that illustrates the processing of a generatesimulated VCGs component of the MLMO system in some embodiments.

FIG. 6 is a flow diagram that illustrates the processing of a generatetraining data component for cycles in some embodiments.

FIG. 7 is a flow diagram that illustrates the processing of an identifycycles component of the MLMO system in some embodiments.

FIG. 8 is a block diagram that illustrates the processing of a normalizecycle component of the MLMO system in some embodiments.

FIG. 9 is a flow diagram that illustrates processing of a generatetraining data for a sequence of similar cycles component of the MLMOsystem in some embodiments.

FIG. 10 is a flow diagram that illustrates the processing of a classifycomponent of the MLMO system in some embodiments.

DETAILED DESCRIPTION

A method and a system are provided for generating a classifier forclassifying electromagnetic data derived from an electromagnetic sourcewithin a body. A body may be, for example, a human body, and theelectromagnetic source may be a heart, a brain, a liver, a lung, akidney, or another part of the body that generates an electromagneticfield that can be measured, preferably, from outside the body andrepresented via a cardiogram such as an electrocardiogram (“ECG”), avectorcardiogram (“VCG”), and an electroencephalogram (“EEG”). In someembodiments, a machine learning based on modeled output (“MLMO”) systemis provided to generate a classifier by modeling electromagnetic outputof the electromagnetic source for a variety of source configurations andusing machine learning to train a classifier using derivedelectromagnetic data that is derived from the modeled electromagneticoutput as training data. The MLMO system is described below primarily togenerate a classifier for electromagnetic data of the heart.

In some embodiments, the MLMO system employs a computational model ofthe electromagnetic source to generate training data for training theclassifier. A computational model models electromagnetic output of theelectromagnetic source over time based on a source configuration of theelectromagnetic source. The electromagnetic output may representelectrical potential, a current, a magnetic field, and so on. When theelectromagnetic (“EM”) source is a heart, the source configuration mayinclude information on geometry and muscle fibers of the heart, torsoanatomy, scar locations, rotor locations, electrical properties, and soon, and the EM output is a collection of the electric potentials atvarious heart locations over time. To generate the EM output, asimulation may be performed for simulation steps of a step size (e.g., 1ms) to generate an EM mesh for that step. The EM mesh may be afinite-element mesh that stores the value of the electric potential ateach heart location for that step. For example, the left ventricle maybe defined as having approximately 70,000 heart locations with the EMmesh storing an electromagnetic value for each heart location. If so, athree-second simulation with a step size of 1 ms would generate 3,000 EMmeshes that each include 70,000 values. The collection of the EM meshesis the EM output for the simulation. A computational model is describedin C. T. Villongco, D. E. Krummen, P. Stark, J. H. Omens, & A. D.McCulloch, “Patient-specific modeling of ventricular activation patternusing surface ECG-derived vectorcardiogram in bundle branch block,”Progress in Biophysics and Molecular Biology, Volume 115, Issues 2-3,August 2014, Pages 305-313, which is hereby incorporated by reference.

In some embodiments, the MLMO system generates the training data byrunning many simulations, each based on a different sourceconfiguration, which is a set of different values for the configurationparameters of the computational model. For example, the configurationparameters for the heart may be cardiac geometry, rotor location, focalsource location, ventricular orientation in the chest, ventricularmyofiber orientation, cardiomyocyte intracellular potentialelectrogenesis and propagation, and so on. Each configuration parametermay have a set or range of possible values. For example, the rotorlocation may be 78 possible parameter sets corresponding to differentlocations within a ventricle. Since the MLMO system may run a simulationfor each combination of possible values, the number of simulations maybe in the millions.

In some embodiments, the MLMO system uses EM outputs of the simulationsto train the classifier for the generation of a classification based onEM data collected from a patient. The MLMO system may generate derivedEM data, such as an ECG or VCG, for each EM output of a simulation. TheECG and VCG are equivalent source representations of the EM output. TheMLMO then generates a label (or labels) for each derived EM data tospecify its corresponding classification. For example, the MLMO systemmay generate a label that is the value of a configuration parameter(e.g., rotor location) used when generating the EM output from which theEM data was derived. The collection of the derived EM data, whichcorrespond to feature vectors, and their labels compose the trainingdata for training the classifier. The MLMO system then trains theclassifier. The classifier may be any of a variety or combination ofclassifiers including neural networks such as fully-connected,convolutional, recurrent, autoencoder, or restricted Boltzmann machine,a support vector machine, a Bayesian classifier, and so on. When theclassifier is a deep neural network, the training results in a set ofweights for the activation functions of the deep neural network.

In some embodiments, the MLMO system may augment the training data withadditional features from the configuration parameters of the sourceconfiguration used to generate the training data. For example, the MLMOsystem may generate additional features to represent the geometry of theheart, the orientation of the heart, scar location, ablation location,ablation shape, and so on. The MLMO system may input these additionalfeatures into the fully connected layer along with the output generatedby the layer before the fully connected layer of a convolutional neuralnetwork (“CNN”), which is described below. The output of the layerbefore the fully connected layer (e.g., pooling layer) may be“flattened” into a one-dimensional array, and the MLMO system may addthe additional features as further elements of the one-dimensionalarray. The output of the fully connected layer may provide a probabilityfor each label used in the training data. The probabilities will thus bebased on the combination of the derived EM data and the additionalfeatures. The classifier will be able to output different probabilitieseven when the derived EM data is the same or similar to reflect, forexample, that the same or similar EM data may be generated for patientswith different heart geometries and different scar locations. The MLMOsystem may alternatively employ an additional classifier that (1) inputsthe probabilities generated by the CNN based only on the derived EM dataand (2) inputs the additional features and then outputs a finalprobability for each classification that factors in the additionalfeatures. The additional classifier may be, for example, a supportvector machine. The CNN and the additional classifier may be trained inparallel.

In some embodiments, the MLMO system normalizes the VCGs of each cycleof the training data in both the voltage and time axes. A cycle may bedefined as a time interval (e.g., start time to end time) defining asingle unit or beat of periodic electrical activity during normal orabnormal rhythms. Cycles facilitate beat-by-beat analysis of sourceconfiguration evolution over time and enable subsequent voltage and timenormalization over each cycle. Normalization preserves salient featuresof voltage-time dynamics and improves generalizability of the trainingdata to variations in source configuration parameters (e.g. torsoconductivities, lead placement and resistance, myocardial conductionvelocity, action potential dynamics, overall heart size, etc.)anticipated in real patients. The MLMO system may normalize the voltagesto a range between −1 and 1 and the time to a fixed range of 0 to 1 inincrements of milliseconds or percentages. To normalize the voltages fora cycle, the MLMO system may identify the maximum magnitude of thevectors across the axes. The MLMO system divides each voltage by themaximum magnitude. To normalize the time axis, the MLMO system performsan interpolation from the number of points in the VCG, which may be moreor less than 1000, to the 1000 points of the normalized cycle.

In some embodiments, after the classifier is trained, the MLMO system isready to generate classifications based on EM and other routinelyavailable clinical data collected from patients. For example, an ECG maybe collected from a patient, and a VCG may be generated from the ECG.The VCG is input to the classifier to generate a classificationindicating, for example, a rotor location for the patient. As a result,even though the geometry of the patient's heart is not known or nosimulation was based on the same geometry as the patient's heart, theMLMO system can be used to generate a classification. If other patientmeasurements such as cardiac dimensions and orientation, scarconfiguration, etc. are available, they may be included as input withthe EM data to improve accuracy. This allows the classifier toeffectively learn complex hidden features in various clinical data thatare not directly represented by the training data.

In some embodiments, the MLMO system may classify source stability (i.e.the beat-to-beat consistency of a dominant arrhythmia source localizedto a particular region in the heart) by generating training data that isbased on sequences of consecutive cycles that have similar EM features.A technique for determining the stability of arrhythmia sources isdescribed in Krummen, D., et. al., Rotor Stability Separates SustainedVentricular Fibrillation From Self-Terminating Episodes in Humans,Journal of American College of Cardiology, Vol. 63, No. 23, 2014, whichis hereby incorporated by reference. This reference demonstrates theefficacy of targeted ablation at stable source sites for preventingrecurring arrhythmic episodes. For example, given a VCG, the MLMO systemmay identify the cycles and then identify sequences of two consecutivecycles, three consecutive cycles, four consecutive cycles, and so on inwhich all the VCG cycles in the sequence are of similar morphology toeach other. Each identified sequence may be labeled based on the valueof a parameter of the source configuration used to generate the VCG. TheMLMO system may then train a separate classifier for each sequencelength (e.g., 2, 3, 4, and so on) using the training data for thesequences of that sequence length. For example, the MLMO system maytrain a classifier for sequences of two cycles and a separate classifierfor sequences of three cycles. To generate a classification for apatient, the MLMO system may identify sequences of similar cycles ofvarying sequence lengths in the VCG of the patient and input thosesequences into the classifier for the appropriate sequence length. TheMLMO system may then combine the classifications from all theclassifiers to arrive at a final classification or may simply output allthe classifications.

Although a classifier could be trained using actual patient ECGs or VCGsand corresponding intracardiac basket catheter measurements of sourcelocation, the cost of collecting, preparing, and labeling a sufficientnumber of data would be prohibitive. Moreover, training data based onactual patients would likely be too sparse and noisy to be effective attraining a classifier for a large population. In some embodiments, theMLMO system could be trained using a combination of actual patient VCGsand VCGs derived from simulations.

FIG. 1 is a block diagram that illustrates the overall processing of theMLMO system in some embodiments. The MLMO system includes classifiergeneration components 110 and classification components 120. Thecomputational model for a heart is a heart model that may include dataand code stored in a heart model data store 111. A generate simulationscomponent 112 inputs the heart model and the parameter sets for thesimulations. The parameter sets, also referred to as sourceconfigurations, may include a parameter set for each combination ofpossible values of the parameters or may specify how to generate (e.g.,via a computer code) the parameter sets. For example, the computer codefor the rotor location parameter may include a list of possible rotorlocations and for the ventricle orientation parameter may dynamicallygenerate the values from a base orientation axis along with code forgenerating possible tilt angles from that base orientation such as anx-axis and a y-axis increment. The output of the generate simulationscomponent is stored in a voltage solutions data store 113 where avoltage solution is an EM output. A voltage solution is an example of anEM mesh. A generate VCGs component 114 generates a VCG from the voltagesolutions and stores the VCG in a VCG data store 115. The generate VCGscomponent may generate an ECG from the voltage solutions and thengenerate a VCG from the ECG. The generation of a VCG from an ECG isdescribed in J. A. Kors, G. Van Herpen, A. C. Sittig, & J. H. VanBemmel, “Reconstruction of the Frank vectorcardiogram from standardelectrocardiographic leads: diagnostic comparison of different methods,”European Heart Journal, Volume 11, Issue 12, 1 Dec. 1990, Pages1083-1092, which is hereby incorporated by reference. A generatetraining data component 116 inputs the VCGs and labels each VCG with alabel or labels that may be derived from the parameter sets and storesthe training data in a training data store 117. A label may be, forexample, the value of a parameter of the parameter set used to generatethe EM output from which the VCG is derived. A train classifiercomponent 118 inputs the training data, trains a classifier, and storesthe weights (e.g., of activation functions of a convolutional neuralnetwork) in a classifier weights data store 119. To generate aclassification, a collect ECG component 121 inputs an ECG collected froma patient. A generate VCG component 122 generates a VCG from the ECG. Aclassify component 123 inputs the VCG and generates a classificationusing the classifier weights of the trained classifier.

The computing systems (e.g., network nodes or collections of networknodes) on which the MLMO system may be implemented may include a centralprocessing unit, input devices, output devices (e.g., display devicesand speakers), storage devices (e.g., memory and disk drives), networkinterfaces, graphics processing units, cellular radio link interfaces,global positioning system devices, and so on. The input devices mayinclude keyboards, pointing devices, touch screens, gesture recognitiondevices (e.g., for air gestures), head and eye tracking devices,microphones for voice recognition, and so on. The computing systems mayinclude high-performance computing systems, cloud-based servers, desktopcomputers, laptops, tablets, e-readers, personal digital assistants,smartphones, gaming devices, servers, and so on. For example, thesimulations and training may be performed using a high-performancecomputing system, and the classifications may be performed by a tablet.The computing systems may access computer-readable media that includecomputer-readable storage media and data transmission media. Thecomputer-readable storage media are tangible storage means that do notinclude a transitory, propagating signal. Examples of computer-readablestorage media include memory such as primary memory, cache memory, andsecondary memory (e.g., DVD) and other storage. The computer-readablestorage media may have recorded on them or may be encoded withcomputer-executable instructions or logic that implements the MLMOsystem. The data transmission media are used for transmitting data viatransitory, propagating signals or carrier waves (e.g.,electromagnetism) via a wired or wireless connection. The computingsystems may include a secure cryptoprocessor as part of a centralprocessing unit for generating and securely storing keys and forencrypting and decrypting data using the keys.

The MLMO system may be described in the general context ofcomputer-executable instructions, such as program modules andcomponents, executed by one or more computers, processors, or otherdevices. Generally, program modules or components include routines,programs, objects, data structures, and so on that perform tasks orimplement data types of the MLMO system. Typically, the functionality ofthe program modules may be combined or distributed as desired in variousexamples. Aspects of the MLMO system may be implemented in hardwareusing, for example, an application-specific integrated circuit (“ASIC”)or field programmable gate array (“FPGA”).

FIG. 2 is a flow diagram that illustrates the overall processing ofgenerating a classifier by the MLMO system in some embodiments. Agenerate classifier component 200 is executed to generate a classifier.In block 201, the component accesses the computational model to be usedto run the simulations. In block 202, the component selects the nextsource configuration (i.e., parameter set) to be used in a simulation.In decision block 203, if all the source configurations have alreadybeen selected, then the component continues at block 205, else thecomponent continues at block 204. In block 204, the component runs thesimulation using the selected source configuration to generate an EMoutput for the simulation and then loops to block 202 to select the nextsource configuration. In block 205, the component selects the next EMoutput that was generated by a simulation. In decision block 206, if allthe EM outputs have already been selected, then the component continuesat block 210, else the component continues at block 207. In block 207,the component derives the EM data from the EM output. For example, theEM output may be a collection of EM meshes, and the EM data may be anECG or a VCG derived from the electromagnetic values of the EM mesh. Insome embodiments, the component may in addition identify cycles(periodic intervals of arrhythmic activity) within the ECG or VCG. Acycle may be delimited by successive crossings from a negative voltageto a positive voltage (“positive crossings”) or successive crossingsfrom a positive voltage to a negative voltage (“negative crossings”)with respect to a spatial direction or set of directions comprising areference frame or set of reference frames. A reference frame maycoincide with anatomical axes (e.g. left-to-right with x,superior-to-inferior with y, anterior-to-posterior with z), imaging axes(e.g. CT, MR, or x-ray coordinate frames), body-surface lead vectors,principal axes computed by principal component analysis of measured orsimulated EM source configurations and outputs, or user-defineddirections of interest. For example, a three-second VCG may have threecycles, and each cycle may be delimited by the times of the positivecrossings along the x-axis. Alternatively, the cycles may be delimitedby crossings along the y-axis or z-axis. In addition, cycles may bedefined by negative crossings. Thus, in some embodiments, the componentmay generate training data from a single VCG based on various cycledefinitions that are various combinations of positive crossings andnegative crossings with the cycles for all the axes being defined bycrossings on one of the x-axis, y-axis, and z-axis or the cycles foreach defined by crossings on that axis. Moreover, the training data mayinclude cycles identified based on all possible cycle definitions or asubset of the cycle definition. For example, the training data mayinclude, for each axis, a cycle defined by positive crossings of thex-axis, negative crossings of the y-axis, and positive crossings of thataxis itself. Cycles definitions may also be defined by the timing ofelectrical events derived from the values stored in the EM mesh. Forexample, a point or set of points in the mesh may periodically crossvoltage thresholds signifying electrical activation and deactivation.Thus, a cycle may be defined by activation-deactivation, or successiveactivation-activation or deactivation-deactivation intervalscorresponding to a point or set of points within the mesh. The resultingtimings of these intervals can be co-localized to the ECG or VCG forcycles identification. In block 208, the component labels the EM databased on the source configuration (e.g., a source location). When cyclesare identified, the component may label each cycle with the same label.For example, the component may label the identified cycles with the samerotor location. In block 209, the component adds the EM data along withthe label to the training data and then loops to block 205 to select thenext EM output. In block 210, the component trains the classifier usingthe training data and then completes.

FIG. 3 is a block diagram that illustrates training and classifyingusing a convolutional neural network in some embodiments. Theconvolutional neural network may be one-dimensional in the sense that itinputs an image that is a single row of pixels with each pixel having ared, green, and blue (“RGB”) value. The MLMO system sets the values ofthe pixels based on the voltages of a VCG of the training data. Theimage has the same number of pixels as vectors of a VCG of the trainingdata. The MLMO system sets the red, green, and blue values of a pixel ofthe image to the x, y, and z values of the corresponding vector of theVCG. For example, if a cycle of a VCG is 1 second long, and the VCG hasa vector for each millisecond, then the image is 1 by 1000 pixels. Theone-dimensional convolutional neural network (“1D CNN”) trainer 310learns the weights of activation functions for the convolutional neuralnetwork using the training data 301. To generate a classification for apatient, the MLMO system provides the VCG 302 for the patient as aone-dimensional image. The 1D CNN 320 then classifies the VCG based onthe weights and outputs the classification, such as rotor location.

CNNs are a type of neural network that has been developed specificallyto process images. A CNN may be used to input an entire image and outputa classification of the image. For example, a CNN can be used toautomatically determine whether a scan of a patient indicates thepresence of an anomaly (e.g., tumor). The MLMO system considers thederived EM data to be a one-dimensional image. A CNN has multiple layerssuch as a convolution layer, a rectified linear unit (“ReLU”) layer, apooling layer, a fully connected (“FC”) layer, and so on. Some morecomplex CNNs may have multiple convolution layers, ReLU layers, poolinglayers, and FC layers.

A convolution layer may include multiple filters (also referred to askernels or activation functions). A filter inputs a convolution windowof an image, applies weights to each pixel of the convolution window,and outputs an activation value for that convolution window. Forexample, if the image is 256 by 256 pixels, the convolution window maybe 8 by 8 pixels. The filter may apply a different weight to each of the64 pixels in a convolution window to generate the activation value alsoreferred to as a feature value. The convolution layer may include, foreach filter, a node (also referred to as a neuron) for each pixel of theimage assuming a stride of one with appropriate padding. Each nodeoutputs a feature value based on a set of weights for the filter thatare learned during a training phase for that node. Continuing with theexample, the convolution layer may have 65,536 nodes (256*256) for eachfilter. The feature values generated by the nodes for a filter may beconsidered to form a convolution feature map with a height and width of256. If an assumption is made that the feature value calculated for aconvolution window at one location to identify a feature orcharacteristic (e.g., edge) would be useful to identify that feature ata different location, then all the nodes for a filter can share the sameset of weights. With the sharing of weights, both the training time andthe storage requirements can be significantly reduced. If each pixel ofan image is represented by multiple colors, then the convolution layermay include another dimension to represent each separate color. Also, ifthe image is a 3D image, the convolution layer may include yet anotherdimension for each image within the 3D image. In such a case, a filtermay input a 3D convolution window.

The ReLU layer may have a node for each node of the convolution layerthat generates a feature value. The generated feature values form a ReLUfeature map. The ReLU layer applies a filter to each feature value of aconvolution feature map to generate feature values for a ReLU featuremap. For example, a filter such as max(0, activation value) may be usedto ensure that the feature values of the ReLU feature map are notnegative.

The pooling layer may be used to reduce the size of the ReLU feature mapby downsampling the ReLU feature map to form a pooling feature map. Thepooling layer includes a pooling function that inputs a group of featurevalues of the ReLU feature map and outputs a feature value. For example,the pooling function may generate a feature value that is an average ofgroups of 2 by 2 feature values of the ReLU feature map. Continuing withthe example above, the pooling layer would have 128 by 128 poolingfeature map for each filter.

The FC layer includes some number of nodes that are each connected toevery feature value of the pooling feature maps. For example, if animage is to be classified as being a cat, dog, bird, mouse, or ferret,then the FC layer may include five nodes whose feature values providescores indicating the likelihood that an image contains one of theanimals. Each node has a filter with its own set of weights that areadapted to the type of the animal that the filter is to detect.

In the following, the MLMO system is described in reference to thefollowing data structures. The brackets indicate an array. For example,VCG[2].V[5].x represents the voltage for the x-axis for the fifth timeinterval in the second VCG. The data structures are further describedbelow when first referenced.

VCG data structures VCG[ ] Size V[ ] x y z nVCG V[ ] x y z Cycles datastructure #C C[ ] start end Training data structure #TD TD[ ] nVCG[ ]label(s)

FIG. 4 is a flow diagram that illustrates detailed processing of thegenerate classifier component of the MLMO system in some embodiments.The generate classifier component 400 is invoked to generate aclassifier. In block 401, the component invokes a generate simulatedVCGs component to simulate VCGs (VCG[ ]) for a variety of parametersets. In blocks 402-405, the component loops, generating the trainingdata for each simulation. In block 402, the component sets an index i to1 for indexing the parameter sets. In decision block 403, if index i isequal to the number of parameter sets, then all the training data hasbeen generated and the component continues at block 406, else thecomponent continues at block 404. In block 404, the component invokes agenerate training data component, passing an indication of the indexedparameter set. In block 405, the component increments index i and thenloops to block 403. In block 406, the component invokes a trainclassifier component to train the classifier based on the generatedtraining data and then completes.

FIG. 5 is a flow diagram that illustrates the processing of a generatesimulated VCGs component of the MLMO system in some embodiments. Thegenerate simulated VCGs component 500 is invoked to generate a simulatedVCG for each parameter set. In block 501, the component sets an index ito 1 for indexing through the parameter sets. In decision block 502, ifindex i is greater than the number of parameter sets, then the componentcompletes, else the component continues at block 503. In block 503, thecomponent sets an index j to 1 for indexing through the simulationsteps. In decision block 504, if index j is greater than the number ofsimulation steps, then the simulation for the indexed parameter set iscomplete and the component continues at block 507, else the componentcontinues at block 505. In block 505, the component applies thecomputational model based on the indexed parameter set and the indexedsimulation step to generate a voltage solution (VS[j]) for the indexedsimulation step. In block 506, the component increments index j and thenloops to block 504 to process the next simulation step. In block 507,the component generates a VCG (VCG[i]) for the indexed parameter setfrom the voltage solution (VS[ ]) that was calculated for the parameterset. In block 508, the component increments index i and then loops toblock 502 to process the next parameter set.

FIG. 6 is a flow diagram that illustrates the processing of a generatetraining data component for cycles of the MLMO system in someembodiments. The generate training data component 600 is invoked,passing an index i, that indexes a VCG generated for a parameter set andgenerates the training data from the VCG. In block 601, the componentinvokes an identify cycles component, passing an indication of theindexed VCG (VCG[i]) and receiving a normalized VCG (nVCG[ ]) for eachcycle along with a count (#C) of the cycles that were identified. Inblock 602, the component sets an index k to 1 for indexing through thecycles. In decision block 603, if index k is greater than the count ofthe cycles, then the training data for all the cycles of the indexed VCGhas been generated and the component completes, else the componentcontinues at block 604. In block 604, the component increments a runningcount (#TD) of the training data (TD) that is used as an index into thetraining data. In block 605, the component sets the normalized nVCG ofthe indexed training data (TD[#TD].nVCG) to the portion of the VCGspecified by the indexed cycle. The component extracts the portion fromthe x-axis, y-axis, and z-axis as defined by the start and end points ofthe cycle. In block 606, the component sets the label(s) of the indexedtraining data based on the function of the indexed parameter set (e.g.,rotor location). In block 607, the component increments index k to indexto the next cycle and then loops to block 603 to process the next cycle.

FIG. 7 is a flow diagram that illustrates the processing of an identifycycles component of the MLMO system in some embodiments. The identifycycles component 700 is invoked to identify the cycles within a VCG andprovides the normalized VCGs (nVCG[ ]) for the cycles. In block 701, thecomponent initializes an index j to 2 for indexing through the VCG andsets an index k to 0 for indexing through the identified cycles. Indecision block 702, if index j is greater than the size of the VCG, thenthe component has identified all the cycles and the component completes,providing the normalized nVCG, else the component continues at block703. In block 703, if the prior voltage of the x-axis of the VCG(VCG.V[j−1].x) is greater than or equal to zero and the indexed voltageof the x-axis of the VCG (VCG.V[j].x) is less than zero (i.e., anegative crossing of the x-axis), then the start of a possible cycle hasbeen identified and the component continues at block 704 to identify thecycle, else the component continues at block 709. In block 704, thecomponent sets the start of the indexed cycle (C[k].start) equal toindex j. In decision block 705, if at least one cycle has already beenidentified, then the end of the prior cycle is known and the componentincrements index k and continues at block 706, else the componentincrements index k and continues at block 709. In block 706, thecomponent sets the end of the prior cycle to index j−1. In block 707,the component extracts the VCG (eVCG) for the prior indexed cycledelimited by the start and the end of the prior cycle. In block 708, thecomponent invokes a normalize cycle component, passing an indication ofthe extracted VCG (eVCG), and receives the normalized cycle (nVCG). Inblock 709, the component increments the index j for indexing through theVCG and loops to block 702.

FIG. 8 is a block diagram that illustrates the processing of a normalizecycle component of the MLMO system in some embodiments. The normalizecycle component 800 is invoked, passing an indication of the VCG of acycle, and normalizes the cycle. In block 801, the component identifiesthe maximum vector magnitude V′ of the vectors in the cycle. Forexample, a vector magnitude of a vector may be calculated by taking thesquare root of the sum of the squares of the x, y, and z values of thevector. In block 802, the component sets index i to index a next axis ofthe VCG. In decision block 803, if all the axes have already beenselected, then the component completes, providing the normalized VCG,else the component continues at block 804. In block 804, the componentinitializes an index j to 1 for indexing through the vectors of anormalized cycle. In decision block 805, if index j is greater than thenumber of vectors of a normalized cycle, then the component loops toblock 802 to select the next axis, else the component continues at block806. In block 806, the component sets the normalized VCG for the indexedvector for the indexed axis to an interpolation of the passed VCG, theindexed vector, and the maximum vector magnitude V′. The interpolationeffectively compresses or expands the VCG to the number of vectors inthe normalized VCG and divides the x, y, and z values of the vector bythe maximum vector magnitude V′. In block 807, the component incrementsthe index j and then loops to block 805.

FIG. 9 is a flow diagram that illustrates processing of a generatetraining data for a sequence of similar cycles component of the MLMOsystem in some embodiments. The generate training data for a sequence ofsimilar cycles component 900 is invoked to identify sequences of twoconsecutive cycles of the VCG indexed by the passed index i that aresimilar and generate training data based on the identified sequences ofsimilar cycles. The cycles in a sequence are similar according to asimilarity score that reflects the stability of the cycles. In block901, the component invokes the identify cycles component to identify thecycles (nVCG[ ]) for the VCG. In block 902, the component sets an indexj to 2 for indexing through the identified cycles. In decision block903, if index j is greater than the number of identified cycles, thenall the cycles have been indexed and then component completes, else thecomponent continues at block 904. In block 904, the component generatesa similarity score for the cycles indexed by j−1 and j. The similarityscore may be based on, for example, a cosine similarity, a Pearsoncorrelation, and so on. In decision block 905, if similarity score isabove a similarity score threshold (T) indicating similar cycles, then asequence of similar cycles has been identified and the componentcontinues at block 906, else the component continues at block 909. Inblock 906, the component increments a running count (#TD) of thetraining data. In block 907, the component sets the training data to thesequence of similar cycles. In block 908, the component sets the labelfor the training data to a label derived from the parameter set (PS[i])used to generate the VCG and then continues at block 909. In block 909,the component increments index i to select the next sequence of cyclesand loops to block 903.

FIG. 10 is a flow diagram that illustrates the processing of a classifycomponent of the MLMO system in some embodiments. The classify component1000 is invoked, passing a VCG derived from a patient, and outputs aclassification. In block 1001, the component invokes the identify cyclescomponent, passing an indication of the VCG, and receives the normalizedVCGs for the cycles and a count of cycles. In block 1002, the componentsets an index k to 1 for indexing through the cycles. In decision block1003, if index k is greater than the number of cycles, then thecomponent completes with the classifications, else the componentcontinues at block 1004. In block 1004, the component applies theclassifier to the indexed cycle to generate the classification. In block1005, the component increments the index and then loops to block 1003 toprocess the next cycle. A different classification (e.g., differentrotor location) may be generated for each cycle. In such a case, theoverall classification may be derived from the combination of thedifferent classifications (e.g., average of the rotor locations).

The following paragraphs describe various embodiments of aspects of themessage interface system. An implementation of the message interfacesystem may employ any combination of the embodiments. The processingdescribed below may be performed by a computing system with a processorthat executes computer-executable instructions stored on acomputer-readable storage medium that implements the message interfacesystem.

In some embodiments, a method performed by one or more computing systemsis provided for generating a classifier for classifying electromagneticdata derived from an electromagnetic source within a body. The methodaccesses a computational model of the electromagnetic source, thecomputational model for modeling electromagnetic output of theelectromagnetic source over time based on a source configuration of theelectromagnetic source. For each of a plurality of sourceconfigurations, the method generates using the computational model amodeled electromagnetic output of the electromagnetic source for thatsource configuration. The method, for each modeled electromagneticoutput, derives the electromagnetic data for the modeled electromagneticoutput and generates a label for the derived electromagnetic data basedon the source configuration for the modeled electromagnetic data. Themethod trains a classifier with the derived electromagnetic data and thelabels as training data. In some embodiments, the modeledelectromagnetic output for a source configuration includes, for each ofa plurality of time intervals, an electromagnetic mesh with a modeledelectromagnetic value for each of a plurality of locations of theelectromagnetic source. In some embodiments, the derived electromagneticdata, for a time interval, is an equivalent source representation of theelectromagnetic output. In some embodiments, the equivalent sourcerepresentation is generated using principal component analysis. In someembodiments, the method further identifies cycles within the derivedelectromagnetic data for a modeled electromagnetic output. In someembodiments, the same label is generated for each cycle. In someembodiments, the method further identifies a sequence of cycles that aresimilar and wherein the same label is generated for each sequence. Insome embodiments, the deriving of the electromagnetic data for a modeledelectromagnetic output includes normalizing the modeled electromagneticoutput on a per-cycle basis. In some embodiments, the classifier is aconvolutional neural network. In some embodiments, the convolutionalneural network inputs a one-dimensional image. In some embodiments, theclassifier is a recurrent neural network, an autoencoder, or arestricted Boltzmann machine. In some embodiments, the classifier is asupport vector machine. In some embodiments, the classifier is Bayesian.In some embodiments, the electromagnetic source is a heart, a sourceconfiguration represents source location and other properties of a heartdisorder, the modeled electromagnetic output represents activation ofthe heart, and the electromagnetic data is based on body-surfacemeasurements such as an electrocardiogram. In some embodiments, theheart disorder is selected from a set consisting of atrial fibrillation,ventricular fibrillation, atrial tachycardia, ventricular tachycardia,atrial flutter, and premature ventricular contractions.

In some embodiments, a method performed by a computing system isprovided for classifying electromagnetic output collected from a targetthat is an electromagnetic source within a body. The method accesses aclassifier to generate a classification for electromagnetic output of anelectromagnetic source. The classifier is trained using training datagenerated from modeled electromagnetic output for a plurality of sourceconfigurations of an electromagnetic source. The modeled electromagneticoutput is generated using a computational model of the electromagneticsource that models the electromagnetic output of the electromagneticsource over time based on a source configuration. The method collectstarget electromagnetic output from the target. The method applies theclassifier to the target electromagnetic output to generate aclassification for the target. In some embodiments, the training data isgenerated by running, for each of the source configurations, asimulation that generates an electromagnetic mesh for each of aplurality of simulation intervals, each electromagnetic mesh having anelectromagnetic value for a plurality of locations of theelectromagnetic source. In some embodiments, the electromagnetic sourceis a heart, a source configuration represents a source location of aheart disorder, and the modeled electromagnetic output representsactivation of the heart, and the classifier is trained usingelectromagnetic data derived from an electrocardiogram representation ofthe electromagnetic output.

In some embodiments, one or more computing systems are provided forgenerating a classifier for classifying electromagnetic output of anelectromagnetic source. The one or more computing systems include one ormore computer-readable storage mediums and one or more processors forexecuting the computer-executable instructions stored in the one or morecomputer-readable storage mediums. The one or more computer-readablestorage mediums store a computational model of the electromagneticsource. The computational model is modeling electromagnetic output ofthe electromagnetic source over time based on a source configuration ofthe electromagnetic source. The one or more computer-readable storagemediums store computer-executable instructions for controlling the oneor more computing systems to for each of a plurality of sourceconfigurations, generate training data from the electromagnetic outputof the computational model that is based on the source configuration andtrain the classifier using the training data. In some embodiments, thecomputer-executable instructions to generate the training data for asource configuration further control the one or more computing systemsto generate derived electromagnetic data from the electromagnetic outputfor the source configuration and generate a label for theelectromagnetic data based on the source configuration.

Although the subject matter has been described in language specific tostructural features and/or acts, it is to be understood that the subjectmatter defined in the appended claims is not necessarily limited to thespecific features or acts described above. Rather, the specific featuresand acts described above are disclosed as example forms of implementingthe claims. In some embodiments, the MLMO system can be employed toclassify electromagnetic output of an electromagnetic source based ondifferent types of classifications. For example, the classifications mayinclude location of a heart disorder (e.g., rotor location), scarlocation, heart geometry (e.g., ventricle orientation), and so on. Togenerate the training data, the MLMO system labels the training datawith the classification type that the classifier is to generate.Accordingly, the invention is not limited except as by the appendedclaims.

1. A method performed by one or more computing systems for generating aclassifier for classifying electromagnetic data derived from anelectromagnetic source within a body, the method comprising: accessing acomputational model of the electromagnetic source, the computationalmodel for modeling electromagnetic output of the electromagnetic sourceover time based on a source configuration of the electromagnetic source;for each of a plurality of source configurations, generating using thecomputational model a modeled electromagnetic output of theelectromagnetic source for that source configuration; for each modeledelectromagnetic output, deriving the electromagnetic data for themodeled electromagnetic output; and generating a label for the derivedelectromagnetic data based on the source configuration for the modeledelectromagnetic data; and training a classifier with the derivedelectromagnetic data and the labels as training data.
 2. The method ofclaim 1 wherein the modeled electromagnetic output for a sourceconfiguration includes, for each of a plurality of time intervals, anelectromagnetic mesh with a modeled electromagnetic value for each of aplurality of locations of the electromagnetic source.
 3. The method ofclaim 2 wherein the derived electromagnetic data, for a time interval,is an equivalent source representation of the electromagnetic output. 4.The method of claim 3 wherein the equivalent source representation isgenerated using principal component analysis.
 5. The method of claim 3further comprising identifying cycles within the derived electromagneticdata for a modeled electromagnetic output.
 6. The method of claim 5wherein the same label is generated for each cycle.
 7. The method ofclaim 5 further comprising identifying a sequence of cycles that aresimilar and wherein the same label is generated for each sequence. 8.The method of claim 5 wherein the deriving of the electromagnetic datafor a modeled electromagnetic output includes normalizing the modeledelectromagnetic output on a per-cycle basis.
 9. The method of claim 1wherein the classifier is a convolutional neural network.
 10. The methodof claim 9 wherein the convolutional neural network inputs aone-dimensional image.
 11. The method of claim 1 wherein the classifieris a recurrent neural network, an autoencoder, or a restricted Boltzmannmachine.
 12. The method of claim 1 wherein the classifier is a supportvector machine.
 13. The method of claim 1 wherein the classifier isBayesian.
 14. The method of claim 1 wherein the electromagnetic sourceis a heart, a source configuration represents source location and otherproperties of a heart disorder, the modeled electromagnetic outputrepresents activation of the heart, and the electromagnetic data isbased on body-surface measurements such as an electrocardiogram.
 15. Themethod of claim 14 wherein the heart disorder is selected from a setconsisting of atrial fibrillation, ventricular fibrillation, atrialtachycardia, ventricular tachycardia, atrial flutter, prematureventricular complexes, atrioventricular nodal reentrant tachycardia,atrioventricular reentrant tachycardia, and junctional tachycardia. 16.A method performed by a computing system for classifying electromagneticoutput collected from a target that is an electromagnetic source withina body, the method comprising: accessing a classifier to generate aclassification for electromagnetic output of an electromagnetic source,the classifier trained using training data generated from modeledelectromagnetic output for a plurality of source configurations of anelectromagnetic source, the modeled electromagnetic output beinggenerated using a computational model of the electromagnetic source thatmodels the electromagnetic output of the electromagnetic source overtime based on a source configuration; collecting target electromagneticoutput from the target; and applying the classifier to the targetelectromagnetic output to generate a classification for the target. 17.The method of claim 16 wherein the training data is generated byrunning, for each of the source configurations, a simulation thatgenerates an electromagnetic mesh for each of a plurality of simulationintervals, each electromagnetic mesh having an electromagnetic value fora plurality of locations of the electromagnetic source.
 18. The methodof claim 16 wherein the electromagnetic source is a heart, a sourceconfiguration represents a source location of a heart disorder, and themodeled electromagnetic output represents activation of the heart, andthe classifier is trained using electromagnetic data derived from anelectrocardiogram representation of the electromagnetic output.
 19. Oneor more computing systems for generating a classifier for classifyingelectromagnetic output of an electromagnetic source, the systemscomprising: one or more computer-readable storage mediums storing: acomputational model of the electromagnetic source, the computationalmodel for modeling electromagnetic output of the electromagnetic sourceover time based on a source configuration of the electromagnetic source;and computer-executable instructions for controlling the one or morecomputing systems to: for each of a plurality of source configurations,generate training data from the electromagnetic output of thecomputational model that is based on the source configuration; and trainthe classifier using the training data; and one or more processors forexecuting the computer-executable instructions stored in the one or morecomputer-readable storage mediums.
 20. The one or more computing systemsof claim 19 wherein the computer-executable instructions to generate thetraining data for a source configuration further control the one or morecomputing systems to generate derived electromagnetic data from theelectromagnetic output for the source configuration and generate a labelfor the electromagnetic data based on the source configuration.